﻿using System;
using Utils;

namespace UI
{
    public partial class Quit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
          
            if (Session["user"] != null)
            {
                //清空session
                User user = Session["user"] as User;
                string logInfo = "Login," + user.Account + "," + Request.UserHostAddress + ",退出,用户退出系统";
                LogHelper.WriteLog(logInfo);
            }
            Response.Expires = 0;
            Response.Cache.SetNoStore();
            Response.AppendHeader("Pragma", "no-cache");

            Session.Abandon();//强制关闭
            Session.Clear();//清空会话
        }

      


    }
}
